<% if @tag %>
      
  <% if @users %>

    <% if params["action"] == "contributors"%>
      <hr />
    <% end %>
 
    <% if params["action"] == "contributors"%>
      <hr />
    <% end %>

  <% end %>

  <% if current_user && params["action"] == "contributors" %>
    <!-- AJAXify -->
    <div class="btn-group">
      <a class="btn btn-outline-secondary btn-sm" href="/feed/tag/<%=h params[:id] %>.rss"><i class="fa fa-rss"></i> RSS</a>
      <% if current_user.following(params[:id]) %>
        <a rel="tooltip" title="<%= translation('tag.contributors.unfollow',{},false) %>" class="btn btn-outline-secondary btn-sm" href="/unsubscribe/tag/<%=h params[:id] %>"><i class="fa fa-user-plus" aria-hidden="true"></i> <%= translation('tag.contributors.following') %> <b><%=h params[:id] %></b></a>
      <% else %>
        <a class="btn btn-outline-secondary btn-sm" href="/subscribe/tag/<%= params[:id] %>"><i class="fa fa-user-plus" aria-hidden="true"></i> <%= translation('tag.contributors.follow') %> <b><%=h params[:id] %></b></a>
      <% end %>
      <a class="btn btn-outline-secondary btn-sm" rel="popover" data-placement="bottom" data-html="true" data-title="<%= translation('tag.show.users_following_tag',{},false) %>" data-content="<% Tag.followers(params[:id]).each do |user| %><i class='fa fa-star-o'></i> <a href='/profile/<%= user.username %>'><%= user.username %></a><br /><% end %><% if Tag.follower_count(params[:id]) == 0 %><i><%= translation('tag.show.none') %></i><% end %>"><%= Tag.follower_count(params[:id]) %> <i class="fa fa-user"></i> <span class="caret"></span></a>
    </div>
    <br /><br />
    <!-- AJAXify -->
  <% end %>

<% end %>
<br />
<% followers = Tag.followers(params[:id]) %>
<% if @wildcard %>
  <p><%= raw translation('tag.contributors.wild_card_search_detected', tag: strip_tags(params[:id])) %></p>
<% else %>
  <div class="row">
    <div class="col-md-6">
      <% if @contributor_count.nil? || @contributor_count == 0 %>
        <p><%= raw translation('tag.contributors.no_contributors', tag: strip_tags(params[:id])) %></p>
      <% else %>
        <table class="table">
          <tr>
            <th style="width:75%;"><%= translation('tag.contributors.people_who\'ve_contributed') %></th>
            <th><%= translation('tag.contributors.notes') %></th>
          </tr>
          <% if @users %>
            <% @users.each do |user| %>
              <tr class="users-row">
                <td><a href='/profile/<%= user.name %>'><i class="fa fa-user"></i> <%= user.name %></a> <% if user.following(params[:id])%><a aria-label="Following" data-toggle="tooltip" title="Following" data-placement="top"> <i class="fa fa-eye"></i></a><% end %> </td>
                <td><a href='/tag/<%=h params[:id] %>/author/<%= user.name %>'><%= translation('tag.contributors.notes') %> &raquo;</a></td>
              </tr>
            <% end %>
          <% end %>
        </table>
      <% end %>
    </div>
    <div class="col-md-6">
      <% if followers.length == 0 %>
        <p>Nobody is following this topic.</p>
      <% else %>
        <table class="table">
          <tr>
            <th> <%= translation('tag.contributors.people_who_are_following') %> </th>
          </tr>
          <% Tag.followers(params[:id]) && Tag.followers(params[:id]).each do |follower| %>
            <tr class="followers-row">
              <td><a href='/profile/<%= follower.name %>'><i class="fa fa-user-o"></i> <%= follower.name %></a></td>
            </tr>
          <% end %>
        </table>
      <% end %>
    </div>
  </div>
  <br />
<% end %>
